package com.yihuan.service;

import com.yihuan.entity.InformEntity;
import com.yihuan.mapper.InformMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Author:梦醒
 * Date: 2022/4/22 19:49
 * Dream:
 * 信言不美，美言不信。
 * 善者不辩，辩者不善。
 * 知者不博，博者不知。
 * Function:
 */
@Service
public class InformService {
    @Resource
    private InformMapper informMapper;
    
    /**
     * 分页查询数据
     *
     * @param informEntity
     * @return
     */
    public List<InformEntity> findInformByInformList(InformEntity informEntity) {
        return informMapper.findInformByInformList(informEntity);
    }
    
    /**
     * 统计分页查询数据
     *
     * @return
     */
    public int countInformList() {
        return informMapper.countInformList();
    }
    
    /**
     * 模糊分页查询数据
     *
     * @param informEntity
     * @return
     */
    public List<InformEntity> findInformByInformConcatList(InformEntity informEntity) {
        return informMapper.findInformByInformConcatList(informEntity);
    }
    
    /**
     * 模糊统计分页查询数据
     *
     * @param informEntity
     * @return
     */
    public int countInformConcatList(InformEntity informEntity) {
        return informMapper.countInformConcatList(informEntity);
    }
    
    /**
     * 更改信息删除状态
     *
     * @param informEntity
     * @return
     */
    public int updateInformByInformDeleteState(InformEntity informEntity) {
        return informMapper.updateInformByInformDeleteState(informEntity);
    }
    
    /**
     * 注册通知信息
     *
     * @param informEntity
     * @return
     */
    public int insertInformByInformData(InformEntity informEntity) {
        return informMapper.insertInformByInformData(informEntity);
    }
    
    /**
     * 按月份统计日期
     *
     * @param
     * @return
     */
    public List<InformEntity> findInformByInformCount() {
        return informMapper.findInformByInformCount();
    }
    
    /**
     * 浏览量
     *
     * @param informEntity
     * @return
     */
    public int updateInformByInformID(InformEntity informEntity) {
        return informMapper.updateInformByInformID(informEntity);
    }
    
    /**
     * 按编号查询数据
     *
     * @param informEntity
     * @return
     */
    public List<InformEntity> findInformByInformID(InformEntity informEntity) {
        return informMapper.findInformByInformID(informEntity);
    }
    
    /**
     * 统计通知
     *
     * @return
     */
    public int findInformByInform() {
        return informMapper.findInformByInform();
    }
}
